﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Virkir.aspx.cs" Inherits="Virkir" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script>
        $("input[name=audioUri], input[name=videoUri]").change(function () {
            enable(this.name);
        });

        function enable(element) {
            if (element == 'audioUri' && $('input[name=audioUri]').val())
                $('input[name=videoUri]').prop("disabled", true);
            else if (element == 'videoUri' && $('input[name=videoUri]').val())
                $('input[name=audioUri]').prop("disabled", true);
            else {
                $('input[name=audioUri]').prop("disabled", false);
                $('input[name=videoUri]').prop("disabled", false);
            }
        }
        function textCounter(field, cnt, maxlimit) {
            var cntfield = document.getElementById(cnt)
            if (field.value.length > maxlimit) // if too long...trim it!
                field.value = field.value.substring(0, maxlimit);
                // otherwise, update 'characters left' counter
            else
                cntfield.value = maxlimit - field.value.length;
        }
        var downpayment = document.getElementById('downpayment'),
            full_payment = document.getElementById('full_payment');

        function enableToggle(current, other) {
            other.disabled = current.value.replace(/\s+/, '').length > 0 ? true : false;
        }

        downpayment.onkeyup = function () {
            enableToggle(this, full_payment);
        }
        full_payment.onkeyup = function () {
            enableToggle(this, downpayment);
        }
    </script>


</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">



    <div class="TitleSite">Leita eftir arbeiðsgevarum</div>
    <br />
    <div style="float: left; padding-top: 5px; width: 100px;">Tøppa inn v-tal: </div>
    <div style="float: left; margin-left: 5px;">
        <textarea onkeydown="textCounter(this,6);" onkeyup="textCounter(this,'q17length' ,6)" class="textbox" style="width: 150px; vertical-align: middle; resize: none;" name="q17" id="q17" rows="5" cols=""></textarea>
    </div>
    <div style="float: left; padding-top: 3px;">
        <input style="font-size: 12pt; border: 0px none; text-align: center;" readonly="" type="text" id='q17length' name="q17length" size="1" maxlength="1" value="6" />
    </div>
    <div style="margin-left: 10px; float: left;">
        <asp:Button ID="Button1" runat="server" CssClass="button" Text="Leita" OnClick="Button1_Click" />
    </div>
    <div class="Clear"></div>
    <br />


    <div style="float: left; padding-top: 5px; width: 100px;">Tøppa in navn: </div>
    <div style="float: left; margin-left: 5px;">
        <asp:TextBox ID="txtInput" Width="177px" CssClass="textbox" runat="server" OnTextChanged="txtInput_TextChanged"></asp:TextBox>
    </div>

    <div style="float: left; margin-left: 20px;">
        <asp:Button ID="Button3" CssClass="button" runat="server" Text="Leita" OnClick="Button3_Click" />
    </div>


    <div class="Clear"></div>
    <br/>
    <br />
    <div id="CompanyDisplay" runat="server">

        <asp:Repeater ID="rptCompanies" runat="server">
            <HeaderTemplate>
                <table>
                    <tr style="height: 30px;">

                        <td style="width: 70px;"><b>V-Tal</b></td>
                        <td style="padding-left: 2px;width: 175px;"><b>Virkisnavn</b></td>
                        <td style="padding-left: 2px;width: 175px;"><b>Teldupost</b></td>
                        <td style="padding-left: 2px;width: 70px;"><b>Tlf</b></td>
                        <td style="padding-left: 2px;width: 70px;"><b>Mobil</b></td>
                        <td style="padding-left: 2px;width: 150px;"><b>Heimasíða</b></td>
                        <td style="padding-left: 2px;width: 150px;"><b>Búðstaður</b></td>
                        <td style="padding-left: 2px;width: 100px;"><b>Bygd/Bý</b></td>
                        <td style="padding-left: 2px;width: 125px;"></td>
                        <td style="padding-left: 2px;width: 100px;"></td>

                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style="border-bottom: gainsboro solid 1px; height: 30px;">

                    <td><%#Eval("CompanyCode") %></td>
                    <td style="padding-left: 2px;"><%#Eval("CompanyName") %></td>
                    <td style="padding-left: 2px;"><%#Eval("Email") %></td>
                    <td style="padding-left: 2px;"><%#Eval("Phone") %></td>
                    <td style="padding-left: 2px;"><%#Eval("Mobile") %></td>
                    <td style="padding-left: 2px;"><%#Eval("WebPage") %></td>
                    <td style="padding-left: 2px;"><%#Eval("Address") %></td>
                    <td style="padding-left: 2px;"><%#Eval("PostNr.City") %></td>
                    <td style="padding-left: 2px;"><a href="#">Meira upplýsingar</a></td>
                    <td style="padding-left: 2px;"><a href="#">Starvslýsingar</a></td>
                    

                </tr>

            </ItemTemplate>
            <FooterTemplate></table></FooterTemplate>
        </asp:Repeater>

    </div>


</asp:Content>

